<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/barcode/Bas_BarcodeElement.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basproject/barcode/Bas_BarcodeElement.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name:'Bas_BarcodeElement',
        setup() {
            const table = ref({
                key: "BarcodeElementId",
                footer: "Foots",
                cnName: "条码要素",
                name: "barcode/Bas_BarcodeElement",
                newTabEdit: false,
                url: "/Bas_BarcodeElement/",
                sortName: "BarcodeElementId"
            });
            const editFormFields = ref({"CodingType":"","CodingParam":"","CodingDesc":"","CodingFormula":"","CodingLength":"","PadLeftChar":"","Metric":"","MetricSpecialString":"","SampleValue":"","Remarks":""});
            const editFormOptions = ref([[{"dataKey":"BASE_BarcodeElementType","data":[],"title":"要素类型","required":true,"field":"CodingType","type":"select"},
                               {"title":"要素代码","required":true,"field":"CodingParam"}],
                              [{"title":"要素说明","field":"CodingDesc"},
                               {"title":"公式/KEY","field":"CodingFormula"}],
                              [{"title":"要素长度","field":"CodingLength","type":"number"},
                               {"title":"填充字符","field":"PadLeftChar"}],
                              [{"title":"进制","field":"Metric","type":"number"},
                               {"title":"进制字符","field":"MetricSpecialString"}],
                              [{"title":"样例数据","field":"SampleValue"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"CodingType":""});
            const searchFormOptions = ref([[{"dataKey":"BASE_BarcodeElementType","data":[],"title":"要素类型","field":"CodingType","type":"select"}]]);
            const columns = ref([{field:"BarcodeElementId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CodingType",title:"要素类型",type:"string",bind:{ key:"BASE_BarcodeElementType",data:[]},width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CodingParam",title:"要素代码",type:"string",width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CodingDesc",title:"要素说明",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"CodingFormula",title:"公式/KEY",type:"string",width:180,showOverflowTooltip:true,align:"left"},
                       {field:"CodingLength",title:"要素长度",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"PadLeftChar",title:"填充字符",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Metric",title:"进制",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"MetricSpecialString",title:"进制字符",type:"string",width:180,showOverflowTooltip:true,align:"left"},
                       {field:"SampleValue",title:"样例数据",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
